<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>九铭资产管理-问卷调查</title>
		<link rel="stylesheet" href="/Public/Home/css/jiuming.css" />
		<link rel="shortcut icon" href="http://jlzpublicbucket.oss-cn-hangzhou.aliyuncs.com/assets/jiujming.ico" type="image/x-icon">
	</head>
	<body>
		<div class="register-top">
			<div class="register-top-content">
				 <div class="register-top-logo"></div>
				 <div class="register-top-text">个人-问卷调查</div>
			</div>
		</div>
		
		<div class="investigation-top">风险承受能力问卷调查</div>
		<div class="investigation-content">
			<h2>投资者风险承受能力问卷</h2>
			<h3>
				<eq name="type" value="1">(适用于个人客户)
				<else/>(适用于机构客户)
				</eq>
			</h3>
			<p>特别提示：风险承受能力评估是本公司向客户履行适当性职责的一个环节，本公司向客户履行风险承受能力评估等适当性职责，并不能取代您自己的投资判断，也不会降低金融产品的固有风险。此问卷内容及其结果不构成您的投资买卖建议，本公司将不对此份问卷之准确性及资讯是否完整负责。</p>
			
			<volist name="data" id="vo">
				<div id="{$i}" class="question">
					<p>{$i}.{$vo['title']}</p>
					<p class="option" onclick="checked(this,'a','{$i}','{$vo["id"]}')"><span>A</span>{$vo['option_a']}</p>
					<p class="option" onclick="checked(this,'b','{$i}','{$vo["id"]}')"><span>B</span>{$vo['option_b']}</p>
					<if condition="$vo['option_c'] neq ''">
						<p class="option" onclick="checked(this,'c','{$i}','{$vo["id"]}')"><span>C</span>{$vo['option_c']}</p>
					</if>
					<if condition="$vo['option_d'] neq ''">
						<p class="option" onclick="checked(this,'d','{$i}','{$vo["id"]}')"><span>D</span>{$vo['option_d']}</p>
					</if>
					<if condition="$vo['option_e'] neq ''">
						<p class="option" onclick="checked(this,'e','{$i}','{$vo["id"]}')"><span>E</span>{$vo['option_e']}</p>
					</if>
				</div>
			</volist>
			
			<div class="btn sub" id="sub">提交问卷</div>
			
		</div>
		
		<div class="investigation-footer">
			<p class="be-careful">客户确认：</p>
			<p>本<eq name="type" value="1">人<else/>机构</eq>已经了解并愿意遵守国家有关证券市场管理的法律、法规、规章及相关业务规则，本<eq name="type" value="1">人<else/>机构</eq>在此郑重承诺以上填写的内容真实、准确、完整。 若本机构提供的信息发生任何重大变化，本<eq name="type" value="1">人<else/>机构</eq>将及时通知贵公司。</p>
		</div>
		
		<script type="text/javascript" src="/Public/Home/js/jquery.1.9.1.min.js"></script>
		<script>
			var answer = [];
			function checked(ele,option,n,id){
				$("#"+n+" .option span").removeClass('checked');
				$(ele).children('span').addClass('checked');
				answer[n-1] = {id:id,key:option};
				console.log(answer);
			}
			
			$(function(){
				var leng = $(".question").length;
				//提交问卷
				$("#sub").bind('click',function(){
					
					for(var i=0; i<leng-1; i++){
						if(answer[i] == null){
							alert("请答完所有题目，再提交");
							return;
						}
					}
					
					if({$userinfo}){
						var userinfo = {$userinfo};
					}
					$.ajax({
						url:"http://v.wx91go.com/index.php?g=Wap&m=AssetsRegister&a=submit&token=dvaglg1469847559&id=1&isWeb=1",
						dataType:"json",
						type:"POST",
						data:{
							userinfo:userinfo,
							data:answer
						},
						success:function(data){
							if(data.status == 1){
								$.ajax({
									url:"{:U('Assets/after_submit',array('token' => 'dvaglg1469847559'))}",
									dataType:"json",
									type:"GET",
									success:function(data){
										if(data.status == 1){
											
										}else{
											alert(data.msg);
										}
									}
								})
								alert("提交成功！");
								window.location.href = "{:U('Assets/index',array('token' => 'dvaglg1469847559'))}";
							}else{
								alert(data.msg);
							}
						}
					})
				})
			})
		</script>
	</body>
</html>
